<template>
    <el-dialog title="删除区域" :visible.sync="visible" @close="closeDialog">
      <span>确定要删除选中的区域吗？</span>
      <div slot="footer" class="dialog-footer">
        <el-button @click="closeDialog">取消</el-button>
        <el-button type="danger" @click="deleteRegion">删除</el-button>
      </div>
    </el-dialog>
  </template>
  
  <script>
  export default {
    props: {
      visible: Boolean,
      region: Object
    },
    methods: {
      closeDialog() {
        this.$emit('close');
      },
      deleteRegion() {
        this.$emit('delete', this.region);
        this.closeDialog();
      }
    }
  };
  </script>
  